
<extend name="./masterHome" />
<block name="content">

</div>
<!--头部结束-->

<!--中间开始-->
    <div class="mod-order-success"> <h2>
        <div class="state-logo">
            <img src="__PUBLIC__/home/images/tubiao.jpg">
        </div> 订单提交成功，请您在<b class="countdown"><span>1</span>时<span>57</span>分<span>18</span>秒</b>内完成支付 </h2> <p class="amount"> 应付金额:<span>￥</span><span class="price">{$data['or_total']}.00</span></p> <a class="detail-btn detail-show" href="http://mall.360.cn/shop/ordersucc?order_id=1709512114001000002#" onclick="return false">收起详情</a> <div class="order-detail" style="display: block;"> <p></p><li>订单号：{$data['number']}<p></p> </li></div></div>


    </div>
</block>




<script>
    var orderSuccess = (function(){
    var interval,pageRemain,token,orderId;
    var now = new Date();

    var initDetailBtn = function(){
        $('.detail-btn').click(function(){

            $(this).toggleClass('detail-show').text(function(i,txt){
                return '收起详情订单详情'.replace(txt,'');
            });
            $('.order-detail').toggle();
        });
        $('.detail-btn').click();
    }

    var initCountdown = function(){
        interval = setInterval(function(){
            countdown();
        },1000);
        countdown();
    }

    var countdown = function(){
        var timeRemain = pageRemain - (new Date() - now)/1000;
        // console.log(timeRemain)
        if(timeRemain>0){
            var hour = Math.floor(timeRemain/60/60);
            var minute = Math.floor(timeRemain/60%60);
            var second = Math.floor(timeRemain%60);

            $('.countdown').html('<span>' + hour+'</span>时<span>'+minute+'</span>分<span>'+second+'</span>秒');
        }else{
            clearInterval(interval);
            // window.location.href = '/user/myorder'
        }
    }




</script>